<div>
  <!-- 添加商品按钮 -->
  <el-button type="success" plain @click="$router.push('/goods-add')"
    >添加商品</el-button
  >
  <el-table :data="goodsListData" style="width: 100%">
    <el-table-column type="index" :index="indexMethod"> </el-table-column>
    <el-table-column prop="goods_name" label="商品名称" width="180">
    </el-table-column>
    <el-table-column prop="goods_price" label="商品价格" width="180">
    </el-table-column>
    <el-table-column prop="goods_number" label="商品数量" width="180">
    </el-table-column>
    <el-table-column label="创建时间" width="180">
      <!-- 处理时间戳 -->
      <template slot-scope="scope">
        {{ scope.row.add_time | dateFilter }}
      </template>
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          plain
          type="primary"
          icon="el-icon-edit"
        ></el-button>
      </template>
    </el-table-column>
  </el-table>
</div>
